package edu.gatech.cs2340.teamrocket.model.storage;

import edu.gatech.cs2340.teamrocket.model.item.Item;

/**
 * Represents a Shop's Inventory.
 *
 * @author Joe Tacheron
 */
public class ShopInventory extends BasicStorage {

    public static final double BUYBACK_RATIO = 0.75;

    private static final String NAME = "Shop";

    public ShopInventory(){
        super(NAME);
    }

    public ShopInventory(int money){
        super(NAME, money);
    }

    @Override
    public void deductMoney(Item i, int quantity) {
        money -= i.getPrice() * quantity * BUYBACK_RATIO;
    }

    @Override
    public ShopInventory clone(){
        BasicStorage bsClone = super.clone();
        ShopInventory retval = new ShopInventory();
        retval.money = bsClone.money;
        retval.items = bsClone.items;
        return retval;
    }
}